package com.andy.note.main.model.proxy.demo2;
 
import com.andy.note.main.model.proxy.demo1.Hello;
import com.andy.note.main.model.proxy.demo1.IHello;
 
/*
 *Created by William on 2018/8/12 0012
 */
public class DynamicProxyTest {
    public static void main(String[] args) {
        IHello hello = (IHello) new DynaProxyHello().bind(new Hello(), new DLogger());//如果我们需要日志功能，则使用代理类
        //IHello hello = new Hello();//如果我们不需要日志功能则使用目标类
        hello.sayHello("明天");
    }
}